Optimal. Leaf size=78 \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{x}+2 d e \log (x) \left (a+b \log \left (c x^n\right )\right )+e^2 x \left (a+b \log \left (c x^n\right )\right )-\frac {b d^2 n}{x}-b d e n \log ^2(x)-b e^2 n x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 61, normalized size of antiderivative = 0.78, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {43, 2334, 2301} \[ -\left (\frac {d^2}{x}-2 d e \log (x)-e^2 x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b d^2 n}{x}-b d e n \log ^2(x)-b e^2 n x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2301
Rule 2334
Rubi steps
\begin {align*} \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx &=-\left (\frac {d^2}{x}-e^2 x-2 d e \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (e^2-\frac {d^2}{x^2}+\frac {2 d e \log (x)}{x}\right ) \, dx\\ &=-\frac {b d^2 n}{x}-b e^2 n x-\left (\frac {d^2}{x}-e^2 x-2 d e \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )-(2 b d e n) \int \frac {\log (x)}{x} \, dx\\ &=-\frac {b d^2 n}{x}-b e^2 n x-b d e n \log ^2(x)-\left (\frac {d^2}{x}-e^2 x-2 d e \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 76, normalized size = 0.97 \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {d e \left (a+b \log \left (c x^n\right )\right )^2}{b n}+a e^2 x+b e^2 x \log \left (c x^n\right )-\frac {b d^2 n}{x}-b e^2 n x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 98, normalized size = 1.26 \[ \frac {b d e n x \log \relax (x)^{2} - b d^{2} n - a d^{2} - {\left (b e^{2} n - a e^{2}\right )} x^{2} + {\left (b e^{2} x^{2} - b d^{2}\right )} \log \relax (c) + {\left (b e^{2} n x^{2} + 2 \, b d e x \log \relax (c) - b d^{2} n + 2 \, a d e x\right )} \log \relax (x)}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 101, normalized size = 1.29 \[ \frac {b d n x e \log \relax (x)^{2} + b n x^{2} e^{2} \log \relax (x) + 2 \, b d x e \log \relax (c) \log \relax (x) - b n x^{2} e^{2} + b x^{2} e^{2} \log \relax (c) - b d^{2} n \log \relax (x) + 2 \, a d x e \log \relax (x) - b d^{2} n + a x^{2} e^{2} - b d^{2} \log \relax (c) - a d^{2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.32, size = 419, normalized size = 5.37 \[ -\frac {\left (-2 d e x \ln \relax (x )-e^{2} x^{2}+d^{2}\right ) b \ln \left (x^{n}\right )}{x}-\frac {2 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \relax (x )-2 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (x )-2 i \pi b d e x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (x )+2 i \pi b d e x \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \relax (x )+i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 b d e n x \ln \relax (x )^{2}-i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-4 b d e x \ln \relax (c ) \ln \relax (x )+2 b \,e^{2} n \,x^{2}-2 b \,e^{2} x^{2} \ln \relax (c )-4 a d e x \ln \relax (x )-2 a \,e^{2} x^{2}+2 b \,d^{2} n +2 b \,d^{2} \ln \relax (c )+2 a \,d^{2}}{2 x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 83, normalized size = 1.06 \[ -b e^{2} n x + b e^{2} x \log \left (c x^{n}\right ) + a e^{2} x + \frac {b d e \log \left (c x^{n}\right )^{2}}{n} + 2 \, a d e \log \relax (x) - \frac {b d^{2} n}{x} - \frac {b d^{2} \log \left (c x^{n}\right )}{x} - \frac {a d^{2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.66, size = 99, normalized size = 1.27 \[ \ln \relax (x)\,\left (2\,a\,d\,e+2\,b\,d\,e\,n\right )-\frac {a\,d^2+b\,d^2\,n}{x}-\ln \left (c\,x^n\right )\,\left (\frac {b\,d^2+2\,b\,d\,e\,x+b\,e^2\,x^2}{x}-2\,b\,e^2\,x\right )+e^2\,x\,\left (a-b\,n\right )+\frac {b\,d\,e\,{\ln \left (c\,x^n\right )}^2}{n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.01, size = 109, normalized size = 1.40 \[ - \frac {a d^{2}}{x} + 2 a d e \log {\relax (x )} + a e^{2} x - \frac {b d^{2} n \log {\relax (x )}}{x} - \frac {b d^{2} n}{x} - \frac {b d^{2} \log {\relax (c )}}{x} + b d e n \log {\relax (x )}^{2} + 2 b d e \log {\relax (c )} \log {\relax (x )} + b e^{2} n x \log {\relax (x )} - b e^{2} n x + b e^{2} x \log {\relax (c )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________